
public class TimedOperations implements Runnable {

	

	@Override
	public void run() {
		while (true) {
            
			int loopCounter = 0;
			

			for (WaitingQueueForFindNodeResponseEntry eachFindEntry : WaitingQueueForFindNodeResponse
					.getQueue()) {

				loopCounter++;

//				if (loopCounter >= 50) {
//					loopCounter=0;
//					int index = WaitingQueueForFindNodeResponse.getQueue()
//							.indexOf(eachFindEntry);
//					bucketOperations.removeTripleFromBucket(eachFindEntry
//							.getNodeTriple());
//					System.out.println("FIND REQUEST FAILED THROUGH: " + eachFindEntry.getNodeTriple().nodeID);
//					WaitingQueueForFindNodeResponse.getQueue().set(index, null);
//					
//
//				}
			}

			for (WaitingQueueForPongEntry eachPongEntry : WaitingQueueForPong
					.getQueue()) {
				loopCounter++;


//				if (loopCounter >= 50) {
//					loopCounter=0;
//					int index = WaitingQueueForPong.getQueue().indexOf(
//							eachPongEntry);
//					bucketOperations.removeTripleFromBucket(eachPongEntry
//							.getNodeTriple());
//					System.out.println("PING FAILED: " + eachPongEntry.getNodeTriple().nodeID);
//					WaitingQueueForPong.getQueue().set(index, null);
//
//				}
			}
			
			loopCounter++;
			
			

		}

	}

}
